"""
综合案例练习：发工资
"""
import random

# 余额
balance = 10000
for x in range(1, 20):
    # 随机生成绩效分
    performance_num = random.randint(1, 10)
    if performance_num < 5:
        print(f"员工{x},绩效分{performance_num},低于5。不发工资，下一位")
        continue
    if balance >= 1000:
        balance -= 1000
        print(f"员工{x}，发放工资1000元，账户余额为{balance}元")
    else:
        print(f"余额为{balance},余额不足，工资发完了，下月领取吧")
        break
